﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Fjaspx.UI.Web.Administrator.App_Api
{
    public partial class _Ratings : UserPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                Response.ContentType = "text/plain"; // 输出并按xml数据显示
                Response.Clear();
                string Rating = Request["rating"];
                string CookName = Request["id"] + Request.ServerVariables.Get("Remote_Addr").ToString();
                if (Fjaspx.Common.cooks.GetCookie(CookName) == null)
                {
                    ___ROYcms_news_Bll.Hits_news(Convert.ToInt32(Request["id"]));
                    Fjaspx.Common.cooks.SaveCookie(CookName, "true", 6);
                    Response.Write("评价" + Rating + "分成功！");
                }
                else
                {
                    Response.Write("请不要重复投票，6小时之后继续参与。");
                }
            }
            catch { Response.Write("未知错误！"); }
        }

    }
}
